home *** CD-ROM | disk | FTP | other *** search
- OFF2Real v0.1 (alpha) -- Documentation
-
- ABSTRACT:
- OFF2Real converts 3d-object files from OFF format to Real3D v2.47 format. The
- coordinates of the converted object can be scaled to values between 0 and 1 in
- order to achieve optimal precision and ease of use in Real3D.
- The OFF file should be generated by `tddd2off`, a program from the TDDD-Lib
- package by Glenn Lewis which allows various conversions from Imagine´s TDDD
- format. TDDD-Lib is available on Aminet in gfx/3d/.
-
- LEGAL:
- OFF2Real is FREEWARE, you can use and distribute it at no cost but not for profit.
- Please leave this documentation with the program.
- One appeal though:
- If you are a talented 3d-designer and created some interesting objects or if you
- are a programmer and developed an interesting program, which didn´t cost you too
- much effort, consider to distribute your work as freeware for the benefit of all.
- I think the idea of freeware is a wonderful unselfish concept which should be
- supported (You know, the best things in life are for free...)
-
- WARNING:
- This program is in a very early developement stage, so be sure not to work on
- anything important while you try it out and better use RAM:, SD0: or a similar
- volatile data carrier for storage of intermediate files generated during the
- conversion process. You have been warned...
- (It never crashed on my computer, though.)
-
- REQUIREMENTS:
- The program is written in ANSI-C and compiled with gcc v2.6.1 using the `-m68000`
- switch, so in theory all you need is the ixemul library (version 40.4 or higher)
- in your LIBS: directory. However, I was not able to test the program on any
- computer other than my A4000, so if you run into problems send me an E-mail and
- I will try to fix it.
-
- USAGE:
- The program should be started from CLI with
-
- `OFF2Real <-scale | -noscale> <OFF-File> <Real3d-File>`
-
- (substitute suiting filenames for <...>). First of all, however, you would want
- to convert a 3d-object from TDDD format to OFF format by
-
- `tddd2off -geom <TDDD-File> <OFF-File>`.
-
- For example, let´s say you have a stunning masterpiece called `my_object.iob`
- in your current directory together with `tddd2off` and `OFF2Real`.
- `tddd2off -geom my_object.iob RAM:test_object` will create a file named `test_object.geom`
- located in RAM: (remember my warning ?).
- Now typing `OFF2Real -scale RAM:test_object.geom RAM:test_object.r3d` will generate an
- object file in Real3D v2.47 format called `test_object.r3d` in RAM:. This object can
- be loaded directly into Real3D by the menu entry `Project/Objects/Insert` and will
- show up as `RAM:test_obje` (simply the OFF-filename trimmed to 15 characters) in the
- Select Window.
- It should be no problem to integrate the two conversion steps into a shell script
- which will offer you a direct "TDDD2Real" functionality (just take a look at the
- supplied `T3D2Real` script and you will get the idea).
-
- PROS:
- The converted object is a so called TRISET Real3D primitive, which keeps file size,
- memory usage and rendering speed down in comparison to numerous triangle primitives.
- Furthermore you can ask Real3D to do a Phong shading with the object (by choosing
- the menu `Modify/Freeform/Type`) which will produce a smoother look in rendering.
-
- CONS:
- The converted object is a so called TRISET Real3D primitive, which means that only
- triangular modelled objects can be converted (no splines, spheres etc.). Additionally
- it can only have a uniform color due to a limitation of Real3D. This fact gets even
- worse because OFF2Real at this moment is unable to convert the original hierarchy of
- the Imagine object (in fact there is no hierarchy information in an OFF file).
- Fortunately there are ways to overcome these problems:
-
- 1. If you own Imagine (I don´t) there should be a possibility to save each subobject
- and convert them individually (this might be tedious, I know)
- Note: I just discovered that tddd2off supports a `-split` switch which will split
- an object into its subobjects (thus generating several ".geom" files)
-
- 2. Use single-colored brushmaps to recolor the object in Real3D
-
- 3. Wait for the next version of the program, which will hopefully be able to convert
- the original hierarchy (this is high on my priority list)
-
- PROBLEMS:
- I was able to test the program with a few objects from Aminet in gfx/3dobj/ and so far
- only had problems with a huge object file of a `57 chevy (Real3D loads it ok, but is
- not able to do anything with it), but since `showobj`, a TDDD-object viewer, couldn´t
- display it properly I don´t know if OFF2Real is to blame for it (By using the `-split`
- switch of `tddd2off` I was able to convert it, though).
- Apart from this there are probably still a lot of bugs in this program and if you find
- some please tell me about it by E-mail.
- A potential source of trouble is the OFF-file which has to follow EXACTLY the syntax
- generated by `tddd2off` i.e.:
-
- Line 1: <# of points> <# of faces> <# of edges>
- Line 2: <x coord> <y coord> <z coord>
- ...
- Line <# of points> + 1: <x coord> <y coord> <z coord>
- Line <# of points> + 2: `3` <index 1> <index 2> <index 3>
- ...
- Line <# of points> +
- <# of faces> + 1: `3` <index 1> <index 2> <index 3>
-
- This means that OFF2Real3d cannot be used as a general OFF format converter at this
- moment. Due to the rather simple structure of this format it shouldn´t be hard to
- add this functionality if there is need for it (i.e. lots of interesting objects in
- OFF format).
-
- HINTS:
- You can use `tddd2dxf` from TDDD-Lib and Realsoft´s DxfToRPL to convert your objects
- to separate triangles. As said before this type of conversion has its drawbacks, but
- it allows you to unleash Real3D´s particle system on your object (Explode it, blow it
- away, etc.). Hey, one could even use both types of objects in a single animation, I
- have to try this out...
-
- CREDITS:
- Glenn "T3D" Lewis for his excellent TDDD-Lib
-
- AUTHOR:
- Alexander Vilbig, microbiologist and computer scientist in spe
- Send bug-reports, suggestions, etc. to vilbig@informatik.tu-muenchen.de
-